import { ipcMain, BrowserWindow } from 'electron';
ipcMain.handle('drag', (event, value: { x: number; y: number }) => {
  const win = BrowserWindow.fromWebContents(event.sender)!;
  const [x, y] = win.getPosition();
  win.setPosition(x + value.x, y + value.y);
});
